package com.vim.common.model.base;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.io.Serializable;

/**
 * 数据库连接信息
 */
@Component
@ConfigurationProperties(prefix="dataSource")
public class DataSourceSetting implements Serializable{

    /** 驱动名称 */
    private String driverClassName;

    /** 数据库地址 */
    private String url;

    /** 用户名 */
    private String username;

    /** 密码 */
    private String password;

    /** 初始化链接数量 */
    private int initialSize;

    /** 最小链接数量 */
    private int minIdle;

    /** 最大链接数量 */
    private int maxActive;

    /** 获取连接等待超时的时间 */
    private Long maxWait;

    /** 配置监控统计拦截的filters，去掉后监控界面sql无法统计，'wall'用于防火墙 */
    private String filters;

    public String getDriverClassName() {
        return driverClassName;
    }

    public void setDriverClassName(String driverClassName) {
        this.driverClassName = driverClassName;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public int getInitialSize() {
        return initialSize;
    }

    public void setInitialSize(int initialSize) {
        this.initialSize = initialSize;
    }

    public int getMinIdle() {
        return minIdle;
    }

    public void setMinIdle(int minIdle) {
        this.minIdle = minIdle;
    }

    public int getMaxActive() {
        return maxActive;
    }

    public void setMaxActive(int maxActive) {
        this.maxActive = maxActive;
    }

    public Long getMaxWait() {
        return maxWait;
    }

    public void setMaxWait(Long maxWait) {
        this.maxWait = maxWait;
    }

    public String getFilters() {
        return filters;
    }

    public void setFilters(String filters) {
        this.filters = filters;
    }
}
